package com.zzw.thread;

public class Service {

	//Object object1 = new Object();

    public void methodA() {
        synchronized (this) {
            System.out.println("methodA begin");
            boolean isContinueRun = true;
            while (isContinueRun) {
                
            }
            System.out.println("methodA end");
        }
    }

    //Object object2 = new Object();

    public void methodB() {
        synchronized (this) {
            System.out.println("methodB begin");
            System.out.println("methodB end");
        }
    }
}
